<include file="Common:minheader" />
<style>
	.hg{
		height:30px;
		line-height:30px;
	}
	.title{
		margin-top:30px;
	}
</style>
<div class="mtable2">
	<form class="layui-form" action="">
		<input type="hidden" name="id" value="{$id}">
		<b>画廊信息</b><hr>
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			用户昵称：{$info.username}
		</div>
      <div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			标题：{$info.title}
		</div>
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			内容：{$info.content}
		</div>
		<div class="layui-row" style="margin-top:20px; margin-bottom: 20px;">
			<b>图片信息</b><hr>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
    			<tr>
    			    <volist name="imgList" id="vo">
    				    <td align="left"><a href="{$vo}" target="_blank"><img src="{$vo}" border="0" width="50" /></a></td>
    				</volist>
    			</tr>
            </table>
		</div>
		<b>评论内容</b><hr>
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			评论人：{$cInfo.username}
		</div>
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			评论内容：{$cInfo.content}
		</div>
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12 hg">
			评论时间：{$cInfo.addtime}
		</div>
		<hr>
		<div class="layui-form-item">
			<label class="layui-form-label">是否通过：</label>
			<div class="layui-input-block">
				<select name="auitSelect" lay-verify="required" lay-filter="auitSelect">
					<option value="">请选择</option>
					<notempty name="auitSelectList">
						<volist name="auitSelectList" id="vo">
							<option value="{$vo.value}">{$vo.name}</option>
						</volist>
					</notempty>
				</select>
			</div>
		</div>
		<div class="layui-form-item" id="reason" style="display:none">
			<label class="layui-form-label">原因：</label>
			<div class="layui-input-block">
				<input type="text" name="reason" required  lay-verify="" placeholder="请输入审核不通过原因" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
			  <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
			  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
	layui.use('form', function(){
	  var form = layui.form;
	  //监听提交
	  form.on('select(auitSelect)',function(data){ //
			var val = data.value;
			$('#reason').hide();
			if(val==2){
				$('#reason').show();
			}
	  });
	  form.on('submit(formDemo)', function(data){
			var cont = data.field;
			$.ajax({
				url:"{:U('Users/auitUserGalleryComment')}",
				type:'post',
				dataType:'json',
				data:cont,
				success:function(data){
					if(data.code==0){
						layer.alert(data.message);
					}else{
						layer.alert(data.message, function(index){
							//do something
							window.parent.location.reload();
							var index = parent.layer.getFrameIndex(window.name); 
							parent.layer.close(index);
						});
					}
				}
			});
			//layer.msg(JSON.stringify(data.field));
			return false;
	  });
	});
</script>
<!-- /. PAGE INNER  -->
<include file="Common:footer" />